inherited fmSCApproving_AddPodr: TfmSCApproving_AddPodr
  Left = 524
  Top = 225
  Width = 467
  Height = 323
  Caption = #1054#1076#1086#1073#1088#1077#1085#1080#1077' '#1080' '#1087#1088#1080#1074#1103#1079#1082#1072
  Constraints.MinHeight = 323
  Constraints.MinWidth = 467
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 258
    Width = 451
  end
  inherited Panel1: TPanel
    Width = 451
    inherited BitBtn1: TBitBtn
      Left = 276
    end
    inherited BitBtn2: TBitBtn
      Left = 364
    end
  end
  object cxDBVerticalGrid1: TcxDBVerticalGrid [2]
    Left = 0
    Top = 45
    Width = 451
    Height = 135
    Align = alTop
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -15
    Font.Name = 'Arial'
    Font.Style = []
    LookAndFeel.SkinName = 'Office2007Green'
    OptionsView.RowHeaderWidth = 128
    OptionsBehavior.RowSizing = True
    OptionsBehavior.RowTracking = False
    OptionsBehavior.AllowChangeRecord = False
    OptionsData.CancelOnExit = False
    OptionsData.Editing = False
    OptionsData.Appending = False
    OptionsData.Deleting = False
    OptionsData.DeletingConfirmation = False
    OptionsData.Inserting = False
    ParentFont = False
    TabOrder = 2
    DataController.DataSource = dlgDS
    object cxDBVerticalGrid1DBEditorRow1: TcxDBEditorRow
      Properties.Caption = #1060#1048#1054' '#1088#1077#1073#1077#1085#1082#1072
      Properties.DataBinding.FieldName = 'PP'
    end
    object cxDBVerticalGrid1DBEditorRow2: TcxDBEditorRow
      Properties.Caption = #1044#1086#1087'. '#1091#1089#1083#1091#1075#1072
      Properties.EditPropertiesClassName = 'TcxButtonEditProperties'
      Properties.EditProperties.Buttons = <
        item
          Default = True
        end>
      Properties.DataBinding.FieldName = 'STNAME'
    end
    object cxDBVerticalGrid1DBEditorRow3: TcxDBEditorRow
      Properties.Caption = #8470' '#1044#1057
      Properties.DataBinding.FieldName = 'SCID'
    end
    object cxDBVerticalGrid1DBEditorRow4: TcxDBEditorRow
      Properties.Caption = #1044#1072#1090#1072' '#1085#1072#1095#1072#1083#1072
      Properties.DataBinding.FieldName = 'SCDATEBEGIN'
    end
    object cxDBVerticalGrid1DBEditorRow5: TcxDBEditorRow
      Properties.Caption = #1044#1072#1090#1072' '#1086#1082#1086#1085#1095#1072#1085#1080#1103
      Properties.DataBinding.FieldName = 'SCDATEEND'
    end
    object cxDBVerticalGrid1DBEditorRow6: TcxDBEditorRow
      Properties.Caption = #1044#1072#1090#1072' '#1089#1086#1079#1076#1072#1085#1080#1103
      Properties.DataBinding.FieldName = 'SCTIMEENTER'
    end
  end
  object gbPodrazd: TGroupBox [3]
    Left = 0
    Top = 203
    Width = 451
    Height = 49
    Align = alTop
    Caption = #1044#1086#1087#1086#1083#1085#1080#1090#1077#1083#1100#1085#1086#1077' '#1087#1086#1076#1088#1072#1079#1076#1077#1083#1077#1085#1080#1077
    TabOrder = 3
    Visible = False
    object dxLookupTreeView1: TdxLookupTreeView
      Left = 9
      Top = 16
      Width = 433
      Height = 26
      CanSelectParents = False
      DropDownRows = 15
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -15
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentColor = False
      ParentFont = False
      TabOrder = 0
      TabStop = True
      TreeViewColor = clWindow
      TreeViewCursor = crDefault
      TreeViewFont.Charset = DEFAULT_CHARSET
      TreeViewFont.Color = clWindowText
      TreeViewFont.Height = -11
      TreeViewFont.Name = 'MS Sans Serif'
      TreeViewFont.Style = []
      TreeViewIndent = 19
      TreeViewReadOnly = True
      TreeViewShowButtons = True
      TreeViewShowHint = False
      TreeViewShowLines = True
      TreeViewShowRoot = True
      TreeViewSortType = stNone
      TreeViewStateImages = DMInv.ilBJTree
      OnCloseUp = dxLookupTreeView1CloseUp
      DisplayField = 'SDNAME'
      DividedChar = '.'
      ImageIndexField = 'SDISDELETE'
      ListSource = dsSD
      KeyField = 'SDID'
      ListField = 'SDNAME'
      Options = [trDBCanDelete, trDBConfirmDelete, trCanDBNavigate, trSmartRecordCopy, trCheckHasChildren]
      ParentField = 'SDPARID'
      RootValue = Null
      TextStyle = tvtsShort
      Alignment = taLeftJustify
    end
  end
  object cbApprov: TcxCheckBox [4]
    Left = 0
    Top = 180
    Align = alTop
    Caption = #1054#1076#1086#1073#1088#1080#1090#1100'?'
    ParentFont = False
    Style.Font.Charset = DEFAULT_CHARSET
    Style.Font.Color = clWindowText
    Style.Font.Height = -16
    Style.Font.Name = 'Tahoma'
    Style.Font.Style = []
    Style.LookAndFeel.SkinName = 'Office2007Green'
    Style.IsFontAssigned = True
    StyleDisabled.LookAndFeel.SkinName = 'Office2007Green'
    StyleFocused.LookAndFeel.SkinName = 'Office2007Green'
    StyleHot.LookAndFeel.SkinName = 'Office2007Green'
    TabOrder = 4
    Width = 451
  end
  object sqlInsertPodrazdSC: TIBSQL
    Database = DMInv.DBRead
    SQL.Strings = (
      
        'INSERT INTO DETI_PODRAZD_SC (DPID, SCID, SDID, DPTYPE, DPDATEIN,' +
        ' INNOTE, DPDATEOUT)'
      
        'VALUES(GEN_ID(GEN_DETI_PODRAZD_SC_ID,1), :scid, :SDID, :DPTYPE, ' +
        ':DPDATEIN, :INNOTE, :DPDATEOUT)')
    Transaction = DMInv.IBTransaction1
    Left = 225
    Top = 52
  end
  object sqlSetApproved: TIBSQL
    Database = DMInv.DBRead
    SQL.Strings = (
      'UPDATE SPEC_COND SC SET'
      'SC.SCAPPROVED = 1,'
      'SC.SCUSERAPPROVED = CAST(CURRENT_USER AS D_STR40)'
      'WHERE SC.SCID = :SCID')
    Transaction = DMInv.IBTransaction1
    Left = 257
    Top = 52
  end
  object qCheckIndividService: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID)'
      '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = 14150'
      ''
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID'
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      'SELECT sd2.SDID'
      'FROM SYS_DIC sd2'
      'INNER JOIN tree t2 ON t2.sdid = sd2.SDID'
      'WHERE sd2.SDID = :sdid')
    Left = 224
    Top = 128
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'sdid'
        ParamType = ptUnknown
      end>
  end
  object qSD: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT t1.sdparid, t1.sdid, t1.sdname, t1.SDISDELETE'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID, SDISDELETE)'
      
        '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID, sd.SDISDELETE FROM' +
        ' SYS_DIC SD'
      '      WHERE sd.SDPARID = :SDPARID'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID, sd1.SDISDELETE'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  SDNAME, SDID, SDPARID, SDISDELETE FROM tree t'
      ') AS t1'
      'WHERE t1.SDISDELETE = 0'
      'UNION'
      'SELECT SD.SDPARID, SD.SDID, SD.SDNAME, SD.SDISDELETE'
      'FROM SYS_DIC SD'
      'WHERE SD.SDID = :SDPARID AND SD.SDISDELETE = 0'
      'order by 1')
    GeneratorField.Field = 'SDID'
    Left = 344
    Top = 128
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SDPARID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'SDPARID'
        ParamType = ptUnknown
      end>
    object qSDSDPARID: TIntegerField
      FieldName = 'SDPARID'
      ProviderFlags = []
    end
    object qSDSDID: TIntegerField
      FieldName = 'SDID'
      ProviderFlags = []
    end
    object qSDSDNAME: TIBStringField
      FieldName = 'SDNAME'
      ProviderFlags = []
      Size = 2303
    end
    object qSDSDISDELETE: TIntegerField
      FieldName = 'SDISDELETE'
      Origin = '"SYS_DIC"."SDISDELETE"'
    end
  end
  object dsSD: TDataSource
    DataSet = qSD
    Left = 312
    Top = 128
  end
end
